﻿namespace Bookworm.Core
{
    public abstract class IntegerFrame
    {
        private int _value;

        [FrameData(Order = 0)]
        public int Value
        {
            get { return _value; }
            set
            {
                if (value >= MinimumValue && value <= MaximumValue)
                    _value = value;
            }
        }

        protected virtual int MinimumValue
        {
            get { return 0; }
        }

        protected virtual int MaximumValue
        {
            get { return int.MaxValue; }
        }
    }
}
